<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var str = "的睡觉奥奇偶的请问您"
        let a = str.startsWith("睡觉", 1)
        let b = str.endsWith("睡觉", 3)
        let c = str.includes("奇偶")
        console.log(a, b, c);
        let d = "☆"
        console.log(d.repeat(66))

        let arr = Array.of(1, 2, 3)
        let arr1 = arr.find(value => false)
        console.log(arr1);
        arr.push(4, 5, 6)
        console.log(arr);
        let arr2 = arr.findIndex(value => value === 1)
        console.log(arr2);
        arr.copyWithin(2, 4)
        console.log(arr);
        //创建一个 0-99的数组
        var arr3 = new Array(100).fill(0).map((value, index) => index)
        console.log(arr3);

        console.log(Object.is(NaN, NaN))
        console.log(Object.is(0, -0))

        var obj = {
            height:1111
        }
        var obj1 = {
            color: "Red",
            age: 33,
            girlFriend: {
                name: "小花"
            }
        }
        Object.defineProperty(obj,"name",{
            get(){
                return this._name
            },
            set(value){
                this._name = value
            }
        })
        obj.name = "xiaohong"
        console.log(obj);
    </script>
</body>

</html>